import request from '@/utils/request'

export default{
    //获取分类级联选择器
    getOptions(){
        return request({
            url:`/category/cascader`,
            method:'get',
            baseURL:'http://api.exam.com/api/paper/'
        })
    },

    //新增试卷
    add(exam){
        return request({
            url:`/exam/exam`,
            method:'post',
            data:exam,
            baseURL:'http://api.exam.com/api/paper/'
        })
    },

    //修改试卷
    edit(exam){
        return request({
            url:`/exam/exam`,
            method:'put',
            data:exam,
            baseURL:'http://api.exam.com/api/paper/'
        })
    }

}
